
from loguru import logger
from socketd.broker.BrokerListener import BrokerListener
from socketd.transport.core.Message import Message
from socketd.transport.core.Session import Session


class BrokerListenerEx(BrokerListener):

    async def on_open(self, session: Session):
        logger.info("Broker open")
        return await super().on_open(session)

    def on_close(self, session: Session):
        super().on_close(session)

    async def on_message(self, requester: Session, message: Message):
        return await super().on_message(requester, message)

    def on_error(self, session: Session, error):
        super().on_error(session, error)


